const res = uni.$uv.sys();
const platform = uni.$uv.os();
function sys(e) {
	if (e == 'screen') {
		// 获取系统信息
		if (res.windowWidth < 768) {
			return false;
		} else {
			return true;
		}
	} else if (e == 'isPc') {
		// 判断平台
		if (platform === 'mac' || platform === 'macos' || platform === 'windows') {
			return true;
		} else {
			return false;
		}
	}
}

function isApp() {
	let app = false;
	// #ifdef APP-PLUS
	// 在App平台下的代码
	app = true;
	// console.log('Running in APP-PLUS environment');
	// #endif

	// #ifdef H5
	// 在H5平台下的代码
	// console.log('Running in H5 environment');
	// #endif
}
export default {
	screen: sys('screen'),
	isPc: sys('isPc'),
	isApp: isApp(),
	sys: res,
	os: platform,
}